#ifndef _DXYSOCKET_H_
#define _DXYSOCKET_H_

#include <string>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <cstring>

#include "util.h"

namespace dxy::easyWebServer
{
    
class DxySocket
{
public:
    DxySocket();
    ~DxySocket();

    void init(const std::string & ip, uint16_t port);

    int socketAccept();

    int getfd();


private:
    int         m_fd = -1;

};


}


#endif